#ifndef BOYAA_DBPART_H_20090707
#define BOYAA_DBPART_H_20090707

#include <global.h>
#include <map>
#include <vector>
#include <set>
#include "def.h"
#include "baseDbPart.h"

class CDbPart
{
public:
	CDbPart();
	virtual ~CDbPart();

public:
	bool getYmInfo(const std::string& tname, const std::string& ym, unsigned int& seq, int& delflag, int& nodataflag);
	bool getYmInfoFrommSeq(const std::string& tname, const unsigned int seq, std::string& ym, int& delflag, int& nodataflag);
	bool getLastMonth(const std::string& tname, std::string& ym, unsigned int& seq, int& delflag, int& nodataflag);
	bool createRecordTable(const std::string& tname);
	bool getRecord(const std::string& tname, const _u64_ startseq, const unsigned int uid, const unsigned int reqnum, std::map<_u64_, stRecordItem>& record);
	bool getRecordDetail(const std::string& tname, const _u64_ seq, const unsigned int uid, std::string& detail, int& nodataflag);
	bool getUserRecordCount(const std::string& tname, const unsigned int uid, const unsigned int mod, unsigned int& count, int& timezoneinmin, int& nodataflag);

	bool insertAndaddUserRecordCount(const unsigned int uid, const unsigned int mod, const unsigned int delt);

	bool createGameRecordCountTable(const std::string& tname);
	bool createMonthListTable(const std::string& tname);

	bool addTableRecord(const std::string& tname, const unsigned int game, const unsigned int ym, const unsigned int uidmod, const _u64_ rt);
public:
	CBaseDbPart* m_dbHandler;
};
#endif
